package com.java.base.exercise.designmode.builder;

/**
 * @Author RenPu
 * @Date 2021/6/30 11:31
 * @Version 1.0
 * @Description: 设计模式---构建者模式
 **/
public class ComplexTerrainBuilder implements TerrainBuilder {

    Terrain terrain = new Terrain();


    @Override
    public TerrainBuilder builerWall() {
        terrain.wall = new Wall(10, 20, 60, 25);
        return this;
    }

    @Override
    public TerrainBuilder builerMine() {
        terrain.mine = new Mine(10, 20, 60, 25);
        return this;
    }

    @Override
    public TerrainBuilder builerBunker() {
        terrain.bunker = new Bunker(10, 20, 60, 25);
        return this;
    }

    @Override
    public Terrain builder() {
        return terrain;
    }
}
